package bist.believeinstep.logic;

import java.util.List;

import bist.believeinstep.domain.Video;
import bist.believeinstep.impl.VideoTemplate;
import bist.believeinstep.util.Util;

public class VideoService {
	private VideoTemplate videoTemplate;
	
	public VideoService(){
		videoTemplate = (VideoTemplate)Util.getConnection("videoTemplate");
	}
	public void create(Video video){
		videoTemplate.create(video);
	}
	public void update(Video video){
		videoTemplate.update(video);
	}
	public void delete(Integer id){
		videoTemplate.delete(id);
	}
	public void delete(String code){
		videoTemplate.delete(code);
	}
	public Video getVideo(Integer id){
		return videoTemplate.getVideo(id);
	}
	public Video getVideo(String code){
		return videoTemplate.getVideo(code);
	}
	public List<Video> listVideo(String name){
		return videoTemplate.listVideo(name);
	}
	public List<Video> list(){
		return videoTemplate.list();
	}
}
